const { Comment } = require('../../../model/Comment')

module.exports = async (req, res) => {
  // 查询所有评论数量
  const commentCount = await Comment.countDocuments()

  // 查询所有待审核评论数量
  const daiShenHeCount = await Comment.count({ state: 0 })
  // 响应
  res.send({ commentCount, daiShenHeCount })
}
